#define  _CRT_SECURE_NO_WARNINGS
int Sqrt(int x)
{
    if (x < 2)
        return x;
    else
    {
        int left = 0, right = x, mid = 0;
        while (left <= right)
        {
            mid = (left + right) / 2;
            if ((mid * mid) < x && (mid + 1) * (mid + 1) > x)
                return mid;
            else if ((mid * mid) > x)
                right = mid - 1;
            else
                left = mid + 1;
        }
    }
}
int main()
{
    int n;
    scanf("%d", &n);
    int t = Sqrt(n);
    printf("%d\n", t);
    return 0;
}